

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>Search &mdash; Designing a RESTful API with Python and Flask 1.0 documentation</title>
  

  
  

  
  <link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic' rel='stylesheet' type='text/css'>

  
  
    

  

  
  
    <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  

  
    <link rel="top" title="Designing a RESTful API with Python and Flask 1.0 documentation" href="index.html"/> 

  
  <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-nav-search">
        
          <a href="index.html" class="fa fa-home"> Designing a RESTful API with Python and Flask</a>
        
        
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="#" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>
      </div>

      <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
        
          
          
              <ul>
<li class="toctree-l1"><a class="reference internal" href="first.html">使用 Python 和 Flask 设计 RESTful API</a><ul>
<li class="toctree-l2"><a class="reference internal" href="first.html#rest">什么是 REST？</a></li>
<li class="toctree-l2"><a class="reference internal" href="first.html#restful-web-service">什么是一个 RESTful 的 web service？</a></li>
<li class="toctree-l2"><a class="reference internal" href="first.html#web-service">设计一个简单的 web service</a></li>
<li class="toctree-l2"><a class="reference internal" href="first.html#flask">Flask 框架的简介</a></li>
<li class="toctree-l2"><a class="reference internal" href="first.html#python-flask-restful-services">使用 Python 和 Flask 实现 RESTful services</a></li>
<li class="toctree-l2"><a class="reference internal" href="first.html#id2">优化 web service 接口</a></li>
<li class="toctree-l2"><a class="reference internal" href="first.html#id3">加强 RESTful web service 的安全性</a></li>
<li class="toctree-l2"><a class="reference internal" href="first.html#id4">可能的改进</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="second.html">使用 Flask-RESTful 设计 RESTful API</a><ul>
<li class="toctree-l2"><a class="reference internal" href="second.html#restful">RESTful 服务器</a></li>
<li class="toctree-l2"><a class="reference internal" href="second.html#id1">路由</a></li>
<li class="toctree-l2"><a class="reference internal" href="second.html#id2">解析以及验证请求</a></li>
<li class="toctree-l2"><a class="reference internal" href="second.html#id3">生成响应</a></li>
<li class="toctree-l2"><a class="reference internal" href="second.html#id4">认证</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="third.html">使用 Flask 设计 RESTful 的认证</a><ul>
<li class="toctree-l2"><a class="reference internal" href="third.html#id1">示例代码</a></li>
<li class="toctree-l2"><a class="reference internal" href="third.html#id2">用户数据库</a></li>
<li class="toctree-l2"><a class="reference internal" href="third.html#id3">密码散列</a></li>
<li class="toctree-l2"><a class="reference internal" href="third.html#id4">用户注册</a></li>
<li class="toctree-l2"><a class="reference internal" href="third.html#id5">基于密码的认证</a></li>
<li class="toctree-l2"><a class="reference internal" href="third.html#id6">基于令牌的认证</a></li>
<li class="toctree-l2"><a class="reference internal" href="third.html#oauth">OAuth 认证</a></li>
</ul>
</li>
</ul>

          
        
      </div>
      &nbsp;
    <div class="wy-side-ad">
        <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
        <!-- 新模板广告 -->
        <ins class="adsbygoogle"
             style="display:inline-block;width:160px;height:600px"
             data-ad-client="ca-pub-3421553373953599"
             data-ad-slot="9570547632"></ins>
        <script>
        (adsbygoogle = window.adsbygoogle || []).push({});
        </script>


        <!--百度统计代码-->

          <script>
        var _hmt = _hmt || [];
        (function() {
          var hm = document.createElement("script");
          hm.src = "//hm.baidu.com/hm.js?9adc7a1c86496c8e2bc61c4f8fc92d30";
          var s = document.getElementsByTagName("script")[0]; 
          s.parentNode.insertBefore(hm, s);
        })();
        </script>
    </div>

    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
        <a href="index.html">Designing a RESTful API with Python and Flask</a>
      </nav>


      
      <div class="wy-nav-content">
        <div class="rst-content">
          <div role="navigation" aria-label="breadcrumbs navigation">
  <ul class="wy-breadcrumbs">
    <li><a href="index.html">Docs</a> &raquo;</li>
      
    <li></li>
      <li class="wy-breadcrumbs-aside">
        
      </li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document">
            
  <noscript>
  <div id="fallback" class="admonition warning">
    <p class="last">
      Please activate JavaScript to enable the search
      functionality.
    </p>
  </div>
  </noscript>

  
  <div id="search-results">
  
  </div>

          </div>
          <footer>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2014, Miguel.
    </p>
  </div>

  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
  
</footer>
        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'./',
            VERSION:'1.0',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true
        };
    </script>
      <script type="text/javascript" src="_static/jquery.js"></script>
      <script type="text/javascript" src="_static/underscore.js"></script>
      <script type="text/javascript" src="_static/doctools.js"></script>
      <script type="text/javascript" src="_static/searchtools.js"></script>

  

  
  
    <script type="text/javascript" src="_static/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
  
  <script type="text/javascript">
    jQuery(function() { Search.loadIndex("searchindex.js"); });
  </script>
  
  <script type="text/javascript" id="searchindexloader"></script>
   


</body>
</html>